package com.android.losscheck;


import java.sql.SQLException;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class ReqService extends Service {
    
	
	
	private boolean isDestroy = false;
	private final String TAG = "ReqService";
	
	private GetAllDeviceThread getAllDeviceThread;
	
	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		getAllDeviceThread = new GetAllDeviceThread();
		getAllDeviceThread.start();
		return START_STICKY;
	}

	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}

	private class GetAllDeviceThread extends Thread{
		private boolean isDestroy = false;
		
		public void onDestroy(){
			isDestroy = true;
		}
//		@Override
//		public void run() {
//			try {
////				ConnDB.Connection0();
//			} catch (SQLException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();1q`
//			}
//			}
//		
	}
	
	@Override
	public void onDestroy() {
		// TODO Auto-generated method stub
		isDestroy = true;
		getAllDeviceThread.onDestroy();
		super.onDestroy();
	}	
}
